{
  "users": {
    "user": [
    {{foreach from=$users item=user name=feusers}}
      {
        "id": "{{$user.id}}",
        "name": "{{$user.nickname}}",
        "active_tasks": "{{$user.active_tasks}}",
        "done_tasks": "{{$user.done_tasks}}"
      }
      {{if $smarty.foreach.feusers.last}} {{else}},{{/if}}
      {{/foreach}}
    ]
  }
}